package com.lyt.springboot.dao;

import com.lyt.springboot.domain.Order;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface OrderMapper {

    @Insert("INSERT INTO t_order (user_id,order_name) values (#{userId},#{orderName})")
    int insert(Order record);

    @Results({
            @Result(column = "user_id", property = "userId")
    })
    @Select("SELECT * from t_order")
    List<Order> selectAll();

}